//迪米特法则
class  Saleman {
  constructor(public name:string) {
  };
  sale() {
    console.log(this.name+'销售中。。。')
  }
};

class SaleManager {
  private salemans:Array<Saleman>=[new Saleman('张三'),new Saleman('李四')]
  constructor() { };
  sale() {
    this.salemans.forEach(item => {
      item.sale();
    })
  }
};

class CEO{
  private saleMangers: SaleManager = new SaleManager();
  sale() {
    this.saleMangers.sale();
  }
};

let ceo = new CEO();
ceo.sale();

